package tools

import "crypto/sha256"

/**
 ** @author: hui
 ** @email: 3231954428@qq.com
 ** @phone: 15779563913
 ** @DataTime: 2022/2/25 9:19
 **/


/**
计算hash值
 */
func SetHash(data []byte)[]byte{
	hash := sha256.New() //创建sha256对象
	hash.Write(data)

	return hash.Sum(nil)
}